<template>
  <div class="fullscreen">
    <i class="el-icon-full-screen" @click="fullscreen" />
  </div>
</template>

<script>
import screenfull from 'screenfull'
export default {
  methods: {
    fullscreen() {
      if (!screenfull.isEnabled) {
        return this.$message.info('当前浏览器不支持全屏')
      }
      screenfull.toggle()
    }
  }
}
</script>

<style></style>
